((W, CX) => {
  if (typeof W.$utils != 'undefined') {
    return;
  }
  var $utils = () => {};
  $utils.prototype.test = () => {
    console.log('test method');
  };
  $utils.prototype.hideToolbar = () => {
    var cm = 'CLIENT_TOOLBAR_TYPE';
    CX.postNotification(cm, {'toolbarType':0});
  };
  $utils.prototype.exit = () => {
    var cm = 'CLIENT_EXIT_WEBAPP';
    CX.postNotification(cm, {});
  };
  $utils.prototype.location = (callback) => {
    var cm = 'CLIENT_USER_LOCATION';
    CX.unbind(cm);
    callback && CX.bind(cm, callback);
    CX.postNotification(cm, {});
  };
  $utils.prototype.clientInfo = (callback) => {
    var cm = 'CLIENT_APP_CONFIG';
    CX.unbind(cm);
    callback && CX.bind(cm, callback);
    CX.postNotification(cm, {});
  };
  $utils.prototype.CXUser = (callback) => {
    var cm = 'CLIENT_GET_USERINFO';
    CX.unbind(cm);
    callback && CX.bind(cm, callback);
    CX.postNotification(cm, {});
  };

  $utils.prototype.scanner = (callback) => {
    var cm = 'CLIENT_BARCODE_SCANNER';
    var param = {'manualInputTitle':'xx', 'config':{'inputUnable':'xx', 'lightUnable':'xx', 'albumUnable':'xx', 'cancleUnable':'xx'}}
    CX.unbind(cm);
    callback && CX.bind(cm, callback);
    CX.postNotification(cm, param);
  };
  return (W['$utils'] = new $utils());
})(window, window.jsBridge);
